(* matrice.ml
 *
 * This file is part of camEngine
 * 
 * camEngine - A 3d motor for ocaml
 * Copyright (C) 2009 DAVY Guillaume <davyg2@gmail.com>
 *
 * camEngine is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * camEngine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with camEngine.  If not, see <http://www.gnu.org/licenses/>.
 *)

open CamEngine;;
open CamEngine.Vec3d;;
open CamEngine.Matrice;;

let m = new matrice4;;
let n= new matrice4;;
n#fill_diagC 2.;;
m#print;;
print_string "\n";;
m#fill_diagC 2.;;
m#print;;
print_string "\n";;
m#fill_diagA [|1. ; 2. ; 3. ; 4.|];;
m#print;;
print_string "\n";;
m#put 1 3 5.;;
m#print;;
print_string "\n";;
m#add m;;
m#print;;
print_string "\n";;
m#mul n;;
m#print;;
print_string "\n";;
m#mul m;;
m#print;;
print_string "\n";;
n#put 0 3 10.;;
n#put 1 3 20.;;
n#put 2 3 30.;;
n#print;;
print_string "\n";;
let p= new vec3d 1. 2. 3.;;
n#mulVec p;;
print_float p#get_x;;
print_string " ";;
print_float p#get_y;;
print_string " ";;
print_float p#get_z;;
print_string " ";;
print_string "\n";;

